
<form id="pagerForm" method="post" action="factstat?query_mode={{query_mode}}">
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="numPerPage" value="{{psize}}" />
	<input type="hidden" name="orderField" value="{{order_field}}" />
	<input type="hidden" name="query_mode" value="{{query_mode}}" />
	<input type="hidden" name="start" value="{{start}}" />
	<input type="hidden" name="date" value="{{date}}" />
	<input type="hidden" name="group" value="{{group}}" />
</form>

<div class="pageHeader">
	<form onsubmit="return navTabSearch(this);" action="factstat?query_mode={{query_mode}}" method="post">
    <div class="searchBar">
        <table class="searchContent">
            <tr>
            <td> 日期：
                <input name="date" class="date textInput readonly valid" readonly="true" type="text" value="{{date}}">
            </td>
            <td>
                商务分组：
                <select name="group">
                    <option value="">不限</option>
                    {% for i in groups %}
                    <option value="{{i}}" {% if group == i %}selected{%end%}>{{i}}</option>
                    {% end %}
                </select>
            </td>
            <td>
                <div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div>
            </td>
            </tr>
        </table>
    </div>
	</form>
</div>
<div class="pageContent">
	<table class="table" width="100%" layoutH="85">
		<thead>
            <tr>
                <th align="center">厂家</th><th align="center" orderField="user_run">启动用户</th>
                <th align="center" orderField="new_user_run">新增启动用户</th>
                <th align="center" orderField="user_visit">访问用户</th>
                <th align="center" orderField="new_user_visit">新增访问用户</th>
                <th align="center" orderField="pay_user">付费用户</th>
                {% if query_mode == 'fact' %}
                <th align="center" orderField="cpay_down">按章付费数</th>
                <th align="center" orderField="bpay_down">按本付费数</th>
                <th align="center" orderField="cpay_user">按章付费用户</th>
                <th align="center" orderField="bpay_user">按本付费用户</th>
                <th align="center" orderField="cfree_down">按章免费数</th>
                <th align="center" orderField="bfree_down">按本免费数</th>
                <th align="center" orderField="cfree_user">按章免费用户</th>
                <th align="center" orderField="bfree_user">按本免费用户</th>
                {% end %}
                {% if query_mode == 'business' %}
                <th align="center" orderField="consumefee">充值消费</th>
                <th align="center" orderField="msgfee">短信点播</th>
                {% end %}
            </tr>
		</thead>
		<tbody>
            {% for i in basics %}
            <tr>
                <td>{{i['title']}}</td><td>{{i['user_run']}}</td><td>{{i['new_user_run']}}</td>
                <td>{{i['user_visit']}}</td><td>{{i['new_user_visit']}}</td><td>{{i['pay_user']}}</td>
                {% if query_mode == 'fact' %}
                <td>{{i['cpay_down']}}</td><td>{{i['bpay_down']}}</td><td>{{i['cpay_user']}}</td>
                <td>{{i['bpay_user']}}</td><td>{{i['cfree_down']}}</td><td>{{i['bfree_down']}}</td>
                <td>{{i['cfree_user']}}</td><td>{{i['bfree_user']}}</td>
                {% end %}
                {% if query_mode == 'business' %}
                <td>{{i['consumefee']}}</td><td>{{i['msgfee']}}</td>
                {% end %}
            </tr>
            {% end %}
		</tbody>		
    </table>
    {% module Pagination(count,page,psize) %}
</div>

